﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Alti.SharePoint.SPDataGenerator.Models
{
    public class SPDataList
    {
        public string ListUrl { get; set; }
        public string ListID { get; set; }
        public string ListName { get; set; }
        public bool Hidden { get; set; }

        private string _Summary;
        public string Summary
        {
            get
            {
                return _Summary;
            }
            set
            {
                _Summary = (value == null ? null : value.Replace(Environment.NewLine, " ").Replace("<", ""));
            }
        }

        public List<SPDataField> Fields { get; set; }
        public List<SPDataContentType> ContentTypes { get; set; }

        public SPDataList()
        {

        }


        public override string ToString()
        {
            if (Hidden)
                return string.Format("({0})", this.ListName);
            else
                return this.ListName;
        }
    }
}
